<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模板测试文件</title>
</head>
<body>
<ul>
    {% for x in my_dict.c %}
        {% if forloop.counter|divisibleby:2 == True %}
            <li style="color:blue">{{forloop.counter}}---{{x|add:100}}</li>
        {% else %}
            <li style="color:red">{{forloop.counter}}---{{x|add:100}}</li>
        {% endif %}
    {% endfor %}
</ul>


<table border="1" width="100%">
    {% for x in my_dict.e %}
        <tr>
            {% if forloop.counter|divisibleby:2 == True %}
                {% for y in my_dict.e %}
                    <td style="color:blue">{{x}}*{{y}}={% widthratio x 1 y %}</td>
                {% endfor%}
            {% else %}
                {% for y in my_dict.e %}
                    <td style="color:red">{{x}}*{{y}}={% widthratio x 1 y %}</td>
                {% endfor%}
            {% endif %}
        </tr>
    {% endfor %}

</table>

</body>
</html>